import request from '@/utils/request'

export function getList(params) {
  return request({
    url: process.env.VUE_APP_BASE_URL+'/admin/bom/index',
    method: 'get',
    params,
  })
}

export function recursionList(params) {
  return request({
    // url: process.env.VUE_APP_BASE_URL+'/admin/bom/recursionList',
    url: process.env.VUE_APP_BASE_URL+'/admin/bom/skuRecursionList',
    method: 'get',
    params,
  })
}

export function doEdit(data) {
  return request({
    url: process.env.VUE_APP_BASE_URL+'/admin/bom/edit',
    method: 'post',
    data,
  })
}

export function doDelete(data) {
  return request({
    url: process.env.VUE_APP_BASE_URL+'/admin/bom/del',
    method: 'post',
    data,
  })
}
export function getFile(params) {
  return request({
    url: process.env.VUE_APP_BASE_URL+'/admin/bom/files',
    method: 'get',
    params,
  })
}
export function getChildrenBySku(params){
  return request({
    url: process.env.VUE_APP_BASE_URL+'/admin/bom/getChildrenBySku',
    method: 'get',
    params,
  })
}
//tool 报价工具专用方法
export function getChildrenBySkuTool(params){
  return request({
    url: process.env.VUE_APP_BASE_URL+'/admin/bom/getChildrenBySkuTool',
    method: 'get',
    params,
  })
}
